package servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BigTextServlet extends HttpServlet{
	@Override
	public void init() throws ServletException {
		super.init();
		System.out.println("bigtext");
	}
	@Override
	protected void service(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out = response.getWriter();
		//这一句相当于以下注释掉的两句，使用浏览器知道输出的数据是html
		response.setContentType("text/html");
		//out.println("<html>");
		for(int i=1;i<=100;i++){
			String bigText="<span style=\"font-size:"+i+"px\">"+i+"</span>";
			out.println(bigText);
		}
		//out.println("</html>");
	}
}
